home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 3: CDPD 3
/
Almathera Ten on Ten - Disc 3: CDPD3.iso
/
fish
/
726-750
/
733
/
termcap
/
source.lha
/
configure
next >
Wrap
Text File
|
1992-09-27
|
6KB
|
184 lines
:
# Guess values for system-dependent variables and create Makefiles.
# Generated automatically by autoconf.
# Copyright (C) 1991 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
# Usage: configure [--srcdir=DIR] [--host=HOST] [--gas] [--nfp] [TARGET]
# All args except --srcdir=DIR are ignored.
trap 'rm -f conftest conftest.c; exit 1' 1 3 15
set +u # Make sure unset variables are ok.
for arg in $*; do
# Handle --srcdir with a space before the argument.
if test x$next_srcdir = xyes; then srcdir=$arg; next_srcdir=
# Handle --host with a space before the argument.
elif test x$next_host = xyes; then next_host=
else
case $arg in
+srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=* | --s=*)
srcdir=`echo $arg | sed 's/[+-]*s[a-z]*=//'` ;;
+srcdir | --srcdir | --srcdi | --srcd | --src | --sr | --s)
next_srcdir=yes ;;
+host=* | --host=* | --hos=* | --ho=* | --h=*) ;;
+host | --host | --hos | --ho | --h)
next_host=yes ;;
+gas | --gas | --ga | --g) ;;
+nfp | --nfp | --nf | --n) ;;
*) ;;
esac
fi
done
INCLUDEDIR=${INCLUDEDIR-/usr/include}
rm -f conftest conftest.c
compile='$CC $DEFS conftest.c -o conftest $LIBS >/dev/null 2>&1'
# A filename unique to this package, relative to the directory that
# configure is in, which we can look for to find out if srcdir is correct.
unique_file=termcap.h
# Makefile rules whose targets are searched for in VPATH need to use $<.
# However, old makes do not support it, so we use a combination
# construction in Makefile.in: `$file<'.
# If srcdir is `.', we use sed to change that to `file' for old makes.
# Otherwise, we use sed to change it to `$<'.
# vpsub is the sed program, which changes `$file<' to one or the other.
vpsub='s,\$\([-./a-zA-Z0-9_]*\)<,\1,g'
# srsub changes `@srcdir@' in Makefile.in into either `.' or the path
# of the top of the source tree for the package.
srsub='s,@srcdir@[-./a-zA_Z0-9_]*,.,'
# Find the source files, if location was not specified.
if test x$srcdir = x; then
srcdirdefaulted=yes; srcdir=.
if test ! -r $unique_file; then srcdir=..; fi
fi
if test ! -r $srcdir/$unique_file; then
if test x$srcdirdefaulted = xyes; then
echo "configure: Can not find sources in \`.' or \`..'." 1>&2
else
echo "configure: Can not find sources in \`${srcdir}'." 1>&2
fi
exit 1
fi
if test $srcdir != .; then
VPATH='VPATH = $(srcdir)'
case $srcdir in
/*|~*) ;;
*) srcdir=`pwd`/$srcdir ;; # Make relative path absolute.
esac
vpsub='s,\$\([-./a-zA-Z0-9_]*\)<,\$<,g'
srsub="s,@srcdir@,$srcdir,"
fi
# The Bourne shell writes "command not found" to /dev/tty, so if we get
# a usage message on stderr, we have the program.
#
# ksh and zsh write "command not found" to stderr, but test -n does not
# want any output if there is no program. So we use the `type' builtin
# instead for them (and bash).
if test "$RANDOM" = "$RANDOM"; then
checkfor='test -n "`$checkprog $checkargs 2>&1`"'
else
checkfor='type $checkprog >/dev/null'
fi
echo checking for gcc
checkprog=gcc checkargs=''
test -z "$CC" && eval $checkfor && CC='gcc -O'
CC=${CC-cc}
echo checking for install
# Make sure to not get the incompatible SysV /etc/install.
if test -z "$INSTALL" || test -z "$INSTALLDATA"; then
saveifs="$IFS"; IFS="$IFS:"
for dir in $PATH; do
test -z "$dir" && dir=.
if test $dir != /etc && test -f $dir/install; then
test -z "$INSTALL" && INSTALL="$dir/install -c"
test -z "$INSTALLDATA" && INSTALLDATA="$dir/install -c -m 644"
break
fi
done
IFS="$saveifs"
fi
INSTALL=${INSTALL-cp}
INSTALLDATA=${INSTALLDATA-cp}
echo checking for BSD string and memory functions
echo "#include <strings.h>
main() { exit(0); } t() { rindex(0, 0); bzero(0, 0); }" > conftest.c
eval $compile
if test -s conftest && ./conftest 2>/dev/null; then :
else
DEFS="$DEFS -DUSG"
fi
rm -f conftest conftest.c
echo checking whether the address of an argument can be used as an array
echo 'main() {
/* Return 0 iff arg arrays are ok. */
exit(!x(1, 2, 3, 4));
}
x(a, b, c, d) {
return y(a, &b);
}
/* Return 1 iff arg arrays are ok. */
y(a, b) int *b; {
return a == 1 && b[0] == 2 && b[1] == 3 && b[2] == 4;
}' > conftest.c
eval $compile
./conftest || DEFS="$DEFS -DNO_ARG_ARRAY"
rm -f conftest conftest.c uttest core
trap 'for dir in .; do rm -f $dir/Makefile; done; rm -f config.status; exit 1' 1 3 15
for dir in .; do
test -d $dir || mkdir $dir
echo creating $dir/Makefile
echo '# Generated automatically from Makefile.in by configure.' > $dir/Makefile
sed -e "
$vpsub
$srsub
s,@VPATH@,$VPATH,
s,@DEFS@,$DEFS,
s,@LIBS@,$LIBS,
s,@PROGS@,$PROGS,
s,@CC@,$CC,
s,@INSTALL@,$INSTALL,
s,@INSTALLDATA@,$INSTALLDATA,
" $srcdir/$dir/Makefile.in >> $dir/Makefile
# Prevent GNU make 3 from overflowing arg limit on SysV.
echo "
.NOEXPORT:" >> $dir/Makefile
done
echo creating config.status
echo "\
DEFS=\"$DEFS\"
LIBS=\"$LIBS\"
PROGS=\"$PROGS\"
CC=\"$CC\"
INSTALL=\"$INSTALL\"
INSTALLDATA=\"$INSTALLDATA\"
" > config.status